<?php
require_once('configuration.php');
include('session.php');

//comment line below for testing
error_reporting(0);

//$_SESSION['logged_in'] = TRUE;
//$_SESSION['username']= "Username";

$str1=<<<EOD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=">
<link rel="shortcut icon" href="../img/very-small-logo.png">
<link rel="stylesheet" type="text/css" href="../css/stylesheet.css" /> 
<link rel="stylesheet" type="text/css" href="../css/player.css" />
<title>Twbe</title>
</head>
<body onmouseup="stopDrag();">
<div id="frontbar">
<div>
EOD;


$strbar="";
if($_SESSION['logged_in'] == TRUE){
	$strbar='Hi '.$_SESSION[username].'! | <a href="../twitter/profile.php">Profile</a> | <a href="../twitter/logout.php">Log Out</a>';
} else {
	$strbar='Hi Guest!';
}


$str2=<<<EOD
</div>
</div>
<header>
<div class="left">
<a href="../twitter/index.php"><h1><img src="../img/very-small-logo.png"> Twbe</h1></a>
</div>
<div class="right">

EOD;

$str3="";
if($_SESSION['logged_in'] == TRUE){
    $str3='<a href="../youtube/player.php"><img src="../img/watch.png"></a>';
} else
  $str3='<a href="twitterLogin.php"><img src="../img/twitlogin.png"></a>';


$str4 = <<<EOD
</div>
</header>

EOD;

echo $str1;
echo $strbar;
echo $str2;
echo $str3;
echo $str4;

?>
